package gisutil
{
	import com.esri.ags.geometry.Geometry;
	import com.esri.ags.geometry.MapPoint;
	import com.esri.ags.geometry.Polyline;
	
	import mx.collections.ArrayCollection;
	import mx.collections.ArrayList;
	

	public class SelectRoad
	{
		// 查询开始结束时间
		public var stime:Date;
		public var etime:Date;
		
		// 区域边界	[最大能够包含选择路径]	
		public var bound: RegionBound;
		
		// 道路上各个线
		public var paths:ArrayList;
		
		public function SelectRoad()
		{
		}
		
		public function Buid( grh:Geometry ):void
		{
			var polyLine:Polyline = grh as Polyline ;
			if( null == polyLine ) 
				return ;
			
			bound = new RegionBound();
			bound.Bulid( grh.extent );	
			
			paths = new ArrayList();
			
			for( var i:int = 0; i < polyLine.paths.length ; i++ )
			{
				var oneLine:ArrayList = new ArrayList();				
				
				for each(var p1:MapPoint in  polyLine.paths[i] )
				{
					oneLine.addItem(p1);
				}
				paths.addItem(oneLine);
			}
		}
	}
}